package com.skynet.supervision.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
public enum RecordsType {

    interrogate("讯问笔录","0"),
    ask("询问笔录","1"),
    talk("谈话笔录","2");

    @Getter
    private final String value;
    @Getter
    private final String code;

    public static RecordsType of(String code) {
        if (code != null) {
            for (RecordsType s : RecordsType.values()) {
                if (s.getCode().equals(code)) {
                    return s;
                }
            }
        }
        return null;

    }
}
